
import 'entity_factory.dart';

class BaseEntity<T> {
  int code;
  String msg;
  T? data;

  BaseEntity({required this.code,required this.msg, this.data});

  factory BaseEntity.fromJson(json) {
    return BaseEntity(
        code: json['code'],
        msg: json['msg'],
        data: EntityFactory.convertOBJ(json['data']));
  }
}
